package com.sunrise.xdoc.entity.user;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.sunrise.xdoc.entity.AbstractCodeEntity;
import com.sunrise.xdoc.entity.config.UploadFile;

@Entity
@Table(name = "op_labour_contract")
@Inheritance(strategy = InheritanceType.JOINED)
public class LabourContract extends AbstractCodeEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    private User user;
    private ContractType type;
    private Date ngayKyHopDong;
    private Date ngayHopDong;
    private Date ngayHetHan;
    private Integer kyLanThu;
    private Integer kinhPhiDaoTaoNoiBo;
    private Integer kinhPhiTuyenDung;
    private String dieuKhoanThoaThuan;
    private UploadFile taiLieuDinhKem;
    private String ghiChu;

    @ManyToOne
    @JoinColumn(name = "user_id", nullable = false)
    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @ManyToOne
    @JoinColumn(name = "contract_type_id", nullable = false)
    public ContractType getType() {
        return type;
    }

    public void setType(ContractType type) {
        this.type = type;
    }

    @Column(name = "ngayKyHopDong")
    public Date getNgayKyHopDong() {
        return ngayKyHopDong;
    }

    public void setNgayKyHopDong(Date ngayKyHopDong) {
        this.ngayKyHopDong = ngayKyHopDong;
    }

    @Column(name = "ngayHopDong")
    public Date getNgayHopDong() {
        return ngayHopDong;
    }

    public void setNgayHopDong(Date ngayHopDong) {
        this.ngayHopDong = ngayHopDong;
    }

    @Column(name = "ngayHetHan")
    public Date getNgayHetHan() {
        return ngayHetHan;
    }

    public void setNgayHetHan(Date ngayHetHan) {
        this.ngayHetHan = ngayHetHan;
    }

    @Column(name = "kyLanThu")
    public Integer getKyLanThu() {
        return kyLanThu;
    }

    public void setKyLanThu(Integer kyLanThu) {
        this.kyLanThu = kyLanThu;
    }

    @Column(name = "kinhPhiDaoTaoNoiBo")
    public Integer getKinhPhiDaoTaoNoiBo() {
        return kinhPhiDaoTaoNoiBo;
    }

    public void setKinhPhiDaoTaoNoiBo(Integer kinhPhiDaoTaoNoiBo) {
        this.kinhPhiDaoTaoNoiBo = kinhPhiDaoTaoNoiBo;
    }

    @Column(name = "kinhPhiTuyenDung")
    public Integer getKinhPhiTuyenDung() {
        return kinhPhiTuyenDung;
    }

    public void setKinhPhiTuyenDung(Integer kinhPhiTuyenDung) {
        this.kinhPhiTuyenDung = kinhPhiTuyenDung;
    }

    @Column(name = "dieuKhoanThoaThuan", length = 1024)
    public String getDieuKhoanThoaThuan() {
        return dieuKhoanThoaThuan;
    }

    public void setDieuKhoanThoaThuan(String dieuKhoanThoaThuan) {
        this.dieuKhoanThoaThuan = dieuKhoanThoaThuan;
    }

    @ManyToOne
    @JoinColumn(name = "taiLieuDinhKem_id")
    public UploadFile getTaiLieuDinhKem() {
        return taiLieuDinhKem;
    }

    public void setTaiLieuDinhKem(UploadFile taiLieuDinhKem) {
        this.taiLieuDinhKem = taiLieuDinhKem;
    }

    @Column(name = "ghiChu", length = 1024)
    public String getGhiChu() {
        return ghiChu;
    }

    public void setGhiChu(String ghiChu) {
        this.ghiChu = ghiChu;
    }

}
